\hypertarget{classc_camera_u_v_n_v1}{\section{c\-Camera\-U\-V\-N\-V1类 参考}
\label{classc_camera_u_v_n_v1}\index{c\-Camera\-U\-V\-N\-V1@{c\-Camera\-U\-V\-N\-V1}}
}


摄像机类，升级版；该类对象是整个引擎第一个全局对象。 c\-Camera的区别是： 1）创建了平截头。 2）提供了判断是否在视域的功能。  




{\ttfamily \#include $<$c\-Camera\-V1.\-h$>$}

\subsection*{Public 类型}
\begin{DoxyCompactItemize}
\item 
enum {\bfseries camera\-\_\-type} \{ {\bfseries L\-A\-N\-D}, 
{\bfseries A\-I\-R}
 \}
\end{DoxyCompactItemize}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classc_camera_u_v_n_v1_a97f6c5a1c973df14375b1c011094798c}{{\bfseries c\-Camera\-U\-V\-N\-V1} (camera\-\_\-type type=L\-A\-N\-D)}\label{classc_camera_u_v_n_v1_a97f6c5a1c973df14375b1c011094798c}

\item 
\hypertarget{classc_camera_u_v_n_v1_aaa9686c8afb4f6cce3007d3bd77670ae}{void {\bfseries init} (int width=800, int height=600, D3\-D\-X\-V\-E\-C\-T\-O\-R3 pos=D3\-D\-X\-V\-E\-C\-T\-O\-R3(0, 0, 0), D3\-D\-X\-V\-E\-C\-T\-O\-R3 lookat=D3\-D\-X\-V\-E\-C\-T\-O\-R3(0, 0, 1), D3\-D\-X\-V\-E\-C\-T\-O\-R3 up=D3\-D\-X\-V\-E\-C\-T\-O\-R3(0, 1, 0), float fov=D3\-D\-X\-\_\-\-P\-I/4, float zn=0.\-01f, float zf=5000.\-0f)}\label{classc_camera_u_v_n_v1_aaa9686c8afb4f6cce3007d3bd77670ae}

\item 
\hypertarget{classc_camera_u_v_n_v1_aac60a200d15519cdc97699978c25809a}{void {\bfseries compute} ()}\label{classc_camera_u_v_n_v1_aac60a200d15519cdc97699978c25809a}

\item 
\hypertarget{classc_camera_u_v_n_v1_a256c313ef0d6d31d3bb339855b9e08de}{void \hyperlink{classc_camera_u_v_n_v1_a256c313ef0d6d31d3bb339855b9e08de}{reset} ()}\label{classc_camera_u_v_n_v1_a256c313ef0d6d31d3bb339855b9e08de}

\begin{DoxyCompactList}\small\item\em 重置内部调用init(); \end{DoxyCompactList}\item 
\hypertarget{classc_camera_u_v_n_v1_a89c770ab0bef51a60a0b75671072aeb1}{void {\bfseries rotate\-\_\-x\-\_\-axis} (float angle)}\label{classc_camera_u_v_n_v1_a89c770ab0bef51a60a0b75671072aeb1}

\item 
\hypertarget{classc_camera_u_v_n_v1_a0b9a9e6b61c6a99529bd7323fa018304}{void {\bfseries rotate\-\_\-y\-\_\-axis} (float angle)}\label{classc_camera_u_v_n_v1_a0b9a9e6b61c6a99529bd7323fa018304}

\item 
\hypertarget{classc_camera_u_v_n_v1_a484bd9c7ab5724a6a7208a7b0a5afbaa}{void {\bfseries rotate\-\_\-z\-\_\-axis} (float angle)}\label{classc_camera_u_v_n_v1_a484bd9c7ab5724a6a7208a7b0a5afbaa}

\item 
\hypertarget{classc_camera_u_v_n_v1_a481c71cf7123167a40bd8dc06e10be2f}{void {\bfseries walk\-\_\-x\-\_\-axis} (float units)}\label{classc_camera_u_v_n_v1_a481c71cf7123167a40bd8dc06e10be2f}

\item 
\hypertarget{classc_camera_u_v_n_v1_ac2320754f10cef68306c0c192129ba3f}{void {\bfseries walk\-\_\-y\-\_\-axis} (float units)}\label{classc_camera_u_v_n_v1_ac2320754f10cef68306c0c192129ba3f}

\item 
\hypertarget{classc_camera_u_v_n_v1_a750374e209fae03f63363475db9e95e7}{void {\bfseries walk\-\_\-z\-\_\-axis} (float units)}\label{classc_camera_u_v_n_v1_a750374e209fae03f63363475db9e95e7}

\item 
\hypertarget{classc_camera_u_v_n_v1_a83239594262e7d6aca86d8f772d2ce01}{D3\-D\-X\-M\-A\-T\-R\-I\-X \& {\bfseries get\-View\-Matrix} ()}\label{classc_camera_u_v_n_v1_a83239594262e7d6aca86d8f772d2ce01}

\item 
\hypertarget{classc_camera_u_v_n_v1_ae282ad2aed2fe8fe8901ba61bc4b9c23}{D3\-D\-X\-M\-A\-T\-R\-I\-X \& {\bfseries get\-Proj\-Matrix} ()}\label{classc_camera_u_v_n_v1_ae282ad2aed2fe8fe8901ba61bc4b9c23}

\item 
\hypertarget{classc_camera_u_v_n_v1_ac014a0dd85b18fda163b85322c4ad1c5}{void {\bfseries get\-View\-Port} (D3\-D\-V\-I\-E\-W\-P\-O\-R\-T9 \&t)}\label{classc_camera_u_v_n_v1_ac014a0dd85b18fda163b85322c4ad1c5}

\item 
\hypertarget{classc_camera_u_v_n_v1_a57bd49711d3db34a33d349c9bcdb1362}{void {\bfseries set\-Pos} (D3\-D\-X\-V\-E\-C\-T\-O\-R3 t)}\label{classc_camera_u_v_n_v1_a57bd49711d3db34a33d349c9bcdb1362}

\item 
\hypertarget{classc_camera_u_v_n_v1_a07ddaa5a9fb32d1399ef243ed450134c}{void {\bfseries get\-Pos} (D3\-D\-X\-V\-E\-C\-T\-O\-R3 \&t)}\label{classc_camera_u_v_n_v1_a07ddaa5a9fb32d1399ef243ed450134c}

\item 
\hypertarget{classc_camera_u_v_n_v1_a405901891acf0493623475bb90f5ef21}{void {\bfseries get\-Deep} (D3\-D\-X\-V\-E\-C\-T\-O\-R3 \&t)}\label{classc_camera_u_v_n_v1_a405901891acf0493623475bb90f5ef21}

\item 
\hypertarget{classc_camera_u_v_n_v1_a0b43e9bf38a59f9feadc2a31d76d4d77}{D3\-D\-X\-V\-E\-C\-T\-O\-R3 \& {\bfseries get\-\_\-pos} ()}\label{classc_camera_u_v_n_v1_a0b43e9bf38a59f9feadc2a31d76d4d77}

\item 
\hypertarget{classc_camera_u_v_n_v1_a60193e7a370ae9544a88e56eb4de11a0}{void {\bfseries compute\-V1} ()}\label{classc_camera_u_v_n_v1_a60193e7a370ae9544a88e56eb4de11a0}

\item 
\hypertarget{classc_camera_u_v_n_v1_a5fa299e8220db17750a3742a406de882}{void {\bfseries set\-Lookat} (D3\-D\-X\-V\-E\-C\-T\-O\-R3 t)}\label{classc_camera_u_v_n_v1_a5fa299e8220db17750a3742a406de882}

\item 
void \hyperlink{classc_camera_u_v_n_v1_ad6a1e213bb0aa24a975173d3b63c2aca}{compute\-V2} (\hyperlink{classc_input_controller}{c\-Input\-Controller} $\ast$p\-Input, float delt\-\_\-time, \hyperlink{classc_terrain_v1}{c\-Terrain\-V1} $\ast$p\-Terrain, float Offset\-Y)
\item 
\hypertarget{classc_camera_u_v_n_v1_a702c19476a1308fc6b7fb32198909dd1}{void {\bfseries set\-Speed} (float s)}\label{classc_camera_u_v_n_v1_a702c19476a1308fc6b7fb32198909dd1}

\item 
\hypertarget{classc_camera_u_v_n_v1_a03b692808a40c3473332b9a122e79460}{void {\bfseries make\-Frustum} ()}\label{classc_camera_u_v_n_v1_a03b692808a40c3473332b9a122e79460}

\item 
\hypertarget{classc_camera_u_v_n_v1_ab5277fc013425197579ef4e2cb3c71f1}{bool {\bfseries is\-Visible} (const \hyperlink{structs_bound_box}{s\-Bound\-Box} \&box) const }\label{classc_camera_u_v_n_v1_ab5277fc013425197579ef4e2cb3c71f1}

\end{DoxyCompactItemize}


\subsection{详细描述}
摄像机类，升级版；该类对象是整个引擎第一个全局对象。 c\-Camera的区别是： 1）创建了平截头。 2）提供了判断是否在视域的功能。 

\begin{DoxyRemark}{备注}
因为全局对象的关系，主程序需要创建一个g\-\_\-\-Camera\-V1对象。 
\end{DoxyRemark}


\subsection{成员函数说明}
\hypertarget{classc_camera_u_v_n_v1_ad6a1e213bb0aa24a975173d3b63c2aca}{\index{c\-Camera\-U\-V\-N\-V1@{c\-Camera\-U\-V\-N\-V1}!compute\-V2@{compute\-V2}}
\index{compute\-V2@{compute\-V2}!cCameraUVNV1@{c\-Camera\-U\-V\-N\-V1}}
\subsubsection[{compute\-V2}]{\setlength{\rightskip}{0pt plus 5cm}void c\-Camera\-U\-V\-N\-V1\-::compute\-V2 (
\begin{DoxyParamCaption}
\item[{{\bf c\-Input\-Controller} $\ast$}]{p\-Input, }
\item[{float}]{delt\-\_\-time, }
\item[{{\bf c\-Terrain\-V1} $\ast$}]{p\-Terrain, }
\item[{float}]{Offset\-Y}
\end{DoxyParamCaption}
)}}\label{classc_camera_u_v_n_v1_ad6a1e213bb0aa24a975173d3b63c2aca}

\begin{DoxyItemize}
\item 
\end{DoxyItemize}

该类的文档由以下文件生成\-:\begin{DoxyCompactItemize}
\item 
E\-:/!代码工厂/3\-D引擎/c\-Camera\-V1.\-h\item 
E\-:/!代码工厂/3\-D引擎/c\-Camera\-V1.\-cpp\end{DoxyCompactItemize}
